<?php


namespace app\validate;

use think\Validate;

class UserCheck extends Validate
{
    protected $rule = [
        'user_id' => 'require',
        'cooperate_type'  => 'require',
        'username'  => 'require',
        'phone'  => 'require',
        'title'  => 'require',
        'content'  => 'require',
        'amount'  => 'require',
    ];

    protected $message = [
        'user_id.require' => '用户id不能为空',
        'cooperate_type.require' => '合作类型不能为空',
        'username.require' => '请输入姓名',
        'phone.require' => '请输入手机号',
        'title.require' => '请输入标题',
        'content.require' => '请输入内容',
        'amount.require' => '请输入金额',
    ];

    protected $scene = [
        'apply_cooperate' => ['user_id','cooperate_type','username','phone','content'],
        'feedback'=>['title','content','user_id'],
        'withdrawal'=>['amount','user_id']
    ];
}